<?php

namespace Home\Model;
	
	USE Think\Model;

	class GoodsModel extends Model{

		public function getAll(){

			//连表查询商品
			$goodslist=$this->field('g.id  gid,g.name gname,g.price gp, g.stok gs,g.is_new gnew,g.is_hot ghost,g.is_bast gbast,g.addtime gtime,gi.name giname,ca.name cname,g.describe gdesc')->table('goods g,goods_img gi,category ca')->where('g.cate_id=ca.id and gi.goods_id=g.id and gi.is_face=1 and g.is_bast=1')->select();

			// var_dump($goodslist);
			return $goodslist;
		}
	}